Rails.application.routes.draw do
  devise_for :users,
             path: '',
             path_names: {
               sign_in: 'login',
               sign_out: 'logout',
               registration: 'signup'
             },
             controllers: {
               sessions: 'sessions',
               registrations: 'registrations'
             }
  # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html

  namespace :api do
    namespace :v1 do
      resource :about, only: [ :show ], controller: 'about'

      resources :todos do
        resources :todo_items
      end

      resources :posts do

      end


      get '/autocomplete/index'
    end
  end

end
